package com.molichuxing.services.infrastructure.service;

import com.molichuxing.framework.service.RootService;
import com.molichuxing.services.infrastructure.dto.request.create.FenceCreateDto;
import com.molichuxing.services.infrastructure.dto.request.modify.FenceModifyDto;
import com.molichuxing.services.infrastructure.dto.response.FenceStoreStockDto;
import com.molichuxing.services.property.FenceStoreStockTypeEnum;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 门店仓库围栏绑定 服务类
 * </p>
 *
 * @author
 * @since 2020-02-20
 */

public interface FenceStoreStockService extends RootService {

    /**
     * 获取门店仓库围栏数量
     *
     * @param storeIds
     * @param type
     * @return
     */
    Map<Integer, Integer> getFenceCount(List<Integer> storeIds, Integer type);

    /**
     * 围栏添加
     *
     * @param fenceCreateDto
     * @return
     * @throws Exception
     */
    Boolean createFence(FenceCreateDto fenceCreateDto) throws Exception;

    /**
     * 通过门店或中转库id获取围栏id
     *
     * @param storeId
     * @param fenceStoreStockType
     * @return
     */
    List<Integer> getFenceByStoreId(Integer storeId, FenceStoreStockTypeEnum fenceStoreStockType);

    /**
     * 围栏解除
     *
     * @param fenceModifyDto
     * @return
     */
    Boolean deleteFence(FenceModifyDto fenceModifyDto);

    /**
     * 根据围栏id获取围栏
     *
     * @param fenceIdList
     * @return
     */
    public List<FenceStoreStockDto> getFenceByFenceIdList(List<Integer> fenceIdList);

    /**
     * 获取所有围栏id
     *
     * @return
     */
    List<Integer> getAllFenceIdList();

    /**
     * 获取门店仓库围栏id
     *
     * @param storeIds null 为全部
     * @param type null 为全部
     * @return
     */
     List<Integer> getFenceIdByStoreIds(List<Integer> storeIds, Integer type);

    /**
     * 根据围栏Id返回
     *
     * @param fenceIds null 为全部
     * @param type null 为全部
     * @return  key fenceId ,value  StoreId
     */
    Map<Integer,Integer> getStoreIdByFenceIds(List<Integer> fenceIds, Integer type);

}
